package struts2.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;


public class DemoAction extends ActionSupport {

    private User user=new User();

    public String demo(){
        return SUCCESS;
    }

    public String user(){
        ActionContext.getContext().put("user",getUser());
        System.out.println(getUser());
        return SUCCESS;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getUser() {
        return user;
    }
}
